package com.hyt.it.ogt.ks.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hyt.it.ogt.ks.model.entity.CandidateLogOther;
import com.hyt.it.ogt.ks.model.vo.CandidateLogBeginTimeVO;
import org.apache.ibatis.annotations.Param;
import com.hyt.it.ogt.ks.model.vo.CandidateLogVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 轨迹表-其他轨迹表 Mapper 接口
 * </p>
 *
 * @author liteng
 * @since 2022-11-22
 */
public interface CandidateLogOtherMapper extends BaseMapper<CandidateLogOther> {

    /**
     * 查询操作时间
     * @param examId
     * @param operatorType
     * @return
     */
    List<CandidateLogBeginTimeVO> getCandidateLogBeginOtherTime(String examId, String operatorType);

    /**
     * 分页查询其它轨迹日志
     * @param examId
     * @param candidateId
     * @param eventType
     * @param logType
     * @param offset
     * @param limit
     * @return
     */
    List<CandidateLogOther> queryAnswerOtherLogByPage(String examId, String candidateId, Integer eventType, Integer logType, Integer offset, Integer limit);

    Integer getCountByExamId(@Param("examId") String examId);

    List<CandidateLogOther> findListByExamId(@Param("examId") String examId, @Param("startIndex") Long startIndex, @Param("pageSize") Long pageSize);

    Integer getCountByAll();

    List<CandidateLogOther> findListByAll(@Param("startIndex") Long startIndex, @Param("pageSize") Long pageSize);

    List<CandidateLogVo> getMaxTimeByOperateType(@Param("examId") String examId, @Param("operatorType")String operatorType);

    List<CandidateLogVo> getMaxAndMinTimeByOperateType(@Param("examId") String examId, @Param("operatorType")String operatorType);
}
